package com.stone.springboot.bean;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * Created by Stone on 2017/7/10.
 */

// ApplicationRunner or CommandLineRunner
@Component
public class MyBean implements ApplicationRunner{
    @Override
    public void run(ApplicationArguments args) throws Exception {
       System.setProperty("spring.profiles.active","test");
    }
}
